package com.neu.entity;
/**
 * 
 * @author neustu
 *  京东商品表:
 */
public class Goods {
private int id;  //  商品的编号表:
private String name;   //   商品的名称表
private int price;  //   商品的价格表
private int count;  //  商品的数量表

@Override
public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + count;
	result = prime * result + id;
	result = prime * result + ((name == null) ? 0 : name.hashCode());
	result = prime * result + price;
	return result;
}

@Override
public boolean equals(Object obj) {
	if (this == obj)
		return true;
	if (obj == null)
		return false;
	if (getClass() != obj.getClass())
		return false;
	Goods other = (Goods) obj;
	if (count != other.count)
		return false;
	if (id != other.id)
		return false;
	if (name == null) {
		if (other.name != null)
			return false;
	} else if (!name.equals(other.name))
		return false;
	if (price != other.price)
		return false;
	return true;
}


@Override
public String toString() {
	return "商品系统 [商品的编号=" + id + ", 商品的名字=" + name + ", 商品的价格=" + price + ", 商品的数量=" + count + "]";
}



public Goods() {
	super();
}

public Goods(int id, String name, int price, int count) {
	super();
	this.id = id;
	this.name = name;
	this.price = price;
	this.count = count;
}


public int getId() {
	return id;
}
public void setId(int id) {
	this.id = id;
}
public String getName() {
	return name;
}
public void setName(String name) {
	this.name = name;
}
public int getPrice() {
	return price;
}
public void setPrice(int price) {
	this.price = price;
}
public int getCount() {
	return count;
}
public void setCount(int count) {
	this.count = count;
}


}
